package com.xueyi.aixihu.utils;

import com.xueyi.aixihu.config.SpringContextConfig;
import org.redisson.api.RedissonClient;
import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPoolAbstract;

/**
 * @author LuQi
 * @类描述 JedisUtil
 * @时间 2021/6/24
 */
public class JedisUtil {

    public static final String REDIS_NULL_VALUE = "NULL";
    private static final JedisPoolAbstract JEDIS_POOL = SpringContextConfig.getBean(JedisPoolAbstract.class);
    public static final RedissonClient REDISSON_CLIENT = SpringContextConfig.getBean(RedissonClient.class);

    public static Jedis getJedis() {
        return JEDIS_POOL.getResource();
    }
}
